package com.cplatform.movie.back.sale.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import net.sf.json.JSONObject;

/**
 * <p>
 * @author 左天宇
 * <p>
 * @package com.z.item.entity
 * <p>
 * @time 上午11:08:29 2015年6月5日
 */
@Entity
@Table(name="t_small_image_details")
public class ImageDetails {

	@SequenceGenerator(name = "seq_item", sequenceName = "SEQ_SMALL_SHOP_SEQ")
	@Id
	@GeneratedValue(generator = "seq_item")
	private Long id;
	
	/**
	 * 商品Id
	 */
	@Column(precision=1,name="item_id")
	private Long itemId;
	
	@Column(length=100,name="image_path")
	private String imagePath;

	/**
	 * 图片排序 值越大排序越靠前
	 */
	@Column(precision=9,name="order_num")
	private Long orderNum;
	
	
	public Long getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(Long orderNum) {
		this.orderNum = orderNum;
	}

	public Long getId() {
		return id;
	}

	/**
	 * 图片类型 1:详情图
	 */
	@Column(length=1,name="image_type")
	private String imageType;
	
	
	
	public String getImageType() {
		return imageType;
	}

	public void setImageType(String imageType) {
		this.imageType = imageType;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getItemId() {
		return itemId;
	}

	public void setItemId(Long itemId) {
		this.itemId = itemId;
	}

	public String getImagePath() {
		return imagePath;
	}

	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}
	
	@Override
	public String toString() {
		return JSONObject.fromObject(this).toString();
	}
}
